//package zo
import zoo_management_system.*;
import zoo_management_system.animal.Animal;
import zoo_management_system.animal.aquatic.Dolphin;
import zoo_management_system.animal.terrestria.Elephant;
import zoo_management_system.animal.terrestria.Panda;
import zoo_management_system.animal.TerrestrialAnimals;

public class Main {
    public static void main(String[] args) {


        //创建动物园
        Zoo my_zoo=new Zoo();

        Panda p=new Panda("小花",3);

        TerrestrialAnimals t_a=new TerrestrialAnimals("小汪",4);

        Animal a=new Animal("旺财",6);

        Dolphin d=new Dolphin("海豚",10);

        Elephant e=new Elephant("大象",30);

        my_zoo.add_ainimal(p);
        my_zoo.add_ainimal(t_a);
        my_zoo.add_ainimal(a);
        my_zoo.add_ainimal(d);
        my_zoo.add_ainimal(e);


        System.out.println(my_zoo.display_all_animals());


        my_zoo.delete_ainimal(p);
        System.out.println(my_zoo.display_all_animals());

        my_zoo.update_ainimal(t_a,a);
        System.out.println(my_zoo.display_all_animals());

        Animal tmp_animal=new Animal();
        tmp_animal=my_zoo.find_by_animal_name("大象");

        System.out.println("大象的年龄是："+tmp_animal.getAge());


    }
}


